<template>
    <overallconfig :data="props.data">
        <template #properties>
    
            <el-form-item label="是否只读：">
                <el-switch v-model="props.data.options.readonly" />
            </el-form-item>

            <el-form-item label="是否显示清除按钮：">
                <el-switch v-model="props.data.options.clearable" />
            </el-form-item>

            <el-form-item label="占位符文本：">
                <el-input v-model="props.data.options.placeholder" clearable/>
            </el-form-item>

            <el-form-item label="长度设置：">
                <el-col :span="11">
                    <el-input type="number" placeholder="最小长度" v-model="props.data.options.minlength"/>
                </el-col>
                <el-col :span="2" style="text-align: center;">
                    <span>-</span>
                </el-col>
                <el-col :span="11">
                    <el-input type="number" placeholder="最大长度" v-model="props.data.options.maxlength"/>
                </el-col>
            </el-form-item>
        </template>
    </overallconfig>
</template>

<script setup>
import overallconfig from "../overallconfig.vue"

// 接收父节传入点参数
const props = defineProps({
    data: {
        type: Object,
        default: () => ({}),
    }
})


// 类型参数
const typeOptions = ref([
    {label:"文本", value:"text"},
    {label:"数字", value:"number"},
    {label:"时间", value:"time"},
    {label:"日期", value:"date"},
    {label:"月份", value:"month"}
])
</script>